package cn.usian.controller;

import cn.usian.pojo.Project;
import cn.usian.service.ProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("api/project")
public class ProjectController {
    @Autowired
    ProjectService projectService;

    @RequestMapping("findProjectByName")
    public Project findProjectByName(Integer id){
        return projectService.getById(id);
    }

    @RequestMapping("findList")
    public List<Project> projectList(){
        return projectService.list();
    }
}
